package com.xiao.train.business.controller;

import com.xiao.train.business.service.TrainService;
import com.xiao.train.common.resp.CommonResp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("train")
public class TrainController {

    @Autowired
    TrainService trainService;

    @GetMapping("query-all")
    public CommonResp queryAll() {
        return new CommonResp(trainService.queryAll());
    }
}